﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Summary description for Mobiledto
/// </summary>
public class MobileDto
{
    #region "variable"
    private int id_MN;    
    private int id_UA;    
    private string _phone;    
    private float _balance;    
    #endregion

    #region "properties"
    public int Id_MN
    {
        get { return id_MN; }
        set { id_MN = value; }
    }
    public int Id_UA
    {
        get { return id_UA; }
        set { id_UA = value; }
    }
    public string Phone
    {
        get { return _phone; }
        set { _phone = value; }
    }
    public float Balance
    {
        get { return _balance; }
        set { _balance = value; }
    }
    #endregion
    public MobileDto()
	{
		
	}
    public MobileDto(DataRow row)
    {
        this.id_MN = int.Parse(row["id_MN"].ToString());
        if (row["id_UA"]==DBNull.Value)
        {
            this.id_UA = -1;
        }
        else this.id_UA = int.Parse(row["id_UA"].ToString());
                 
        this._phone=row["_phone"].ToString();
        if (row["_balance"]==DBNull.Value)
        {
            this._balance = 0;
        }
        else this._balance = float.Parse(row["_balance"].ToString());
    }
}